package com.tanhua.houtai.controller;

import com.tanhua.common.utils.NoAuthorization;
import com.tanhua.houtai.service.AnalyByDayService;
import com.tanhua.houtai.vo.PageResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/management/analyByDay")
@Slf4j
public class AnalyByDayController {

    @Autowired
    private AnalyByDayService analyByDayService;

    @GetMapping("/date")
    @NoAuthorization
    public PageResult DateStatistics(@RequestParam(value = "datebegin",required = false ) String datebegin,
                                     @RequestParam(value = "dateend",required = false ) String dateend,
                                     @RequestParam(value ="page" ,required = false ) Integer page,
                                     @RequestParam(value ="pagesize",required = false ) Integer pagesize) {


        return this.analyByDayService.queryDateStatisticsList(datebegin,dateend,page,pagesize);
    }


}
